package net.chenlin.dp.modules.base.manager.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import net.chenlin.dp.modules.base.dao.SysCarMapper;
import net.chenlin.dp.modules.base.entity.SysCarEntity;
import net.chenlin.dp.modules.base.manager.SysCarManager;

/**
 * 车入库
 *
 * @author ZhouChenglin
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018年12月03日 下午9:17:36
 */
@Component("sysCarManager")
public class SysCarManagerImpl implements SysCarManager {

	@Autowired
	private SysCarMapper sysCarMapper;
	

	@Override
	public List<SysCarEntity> listSysCar(Page<SysCarEntity> page, Query search) {
		return sysCarMapper.listForPage(page, search);
	}

	@Override
	public int saveSysCar(SysCarEntity sysCar) {
		return sysCarMapper.save(sysCar);
	}

	@Override
	public SysCarEntity getSysCarById(Long id) {
		SysCarEntity sysCar = sysCarMapper.getObjectById(id);
		return sysCar;
	}

	@Override
	public int updateSysCar(SysCarEntity sysCar) {
		return sysCarMapper.update(sysCar);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = sysCarMapper.batchRemove(id);
		return count;
	}
	
}
